home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.input;
-
- import sub_arctic.lib.interactor;
-
- /**
- * Positional input dispatch agent that delivers raw events. This can be
- * used as a hook for extensions. This agent dispatches the raw_input_acceptor
- * protocol to objects under the cursor at the time of the event.
- *
- * @see sub_arctic.input.raw_input_acceptor
- * @author Scott Hudson
- */
- public class raw_positional_agent extends dispatch_agent {
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Simple constructor */
- public raw_positional_agent()
- {
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Attempt to dispatch a raw event from this agent.
- *
- * @param event evt the event being dispatched.
- * @param Object user_info the information associated with this object at
- * the time it was picked.
- * @param interactor to_obj the object we attempt to send the event to.
- * @param int seq_num the sequence number of the event.
- * @returns boolean indication of whether the event was consumed or not.
- */
- public boolean dispatch_event(
- event evt,
- Object user_info,
- interactor to_obj,
- int seq_num)
- {
- /* see if the object accepts this input -- if so try to dispatch*/
- if (to_obj instanceof raw_input_acceptor)
- {
- /* put event in local coords of object and try to dispatch to it */
- evt.global_to_local(to_obj);
- return ((raw_input_acceptor)to_obj).handle_raw_input(evt,user_info);
- }
- else
- return false;
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-